/******************************************************************************
 * Copyright (C) 2024 Ant IOT, Inc.(Gmbh) or its affiliates.
 * 
 * All Rights Reserved.
 * 
 * @file bsp_led_driver.c
 * 
 * @par dependencies 
 * - bsp_led_driver.h
 * 
 * @author ZCH | R&D Dept. | Ant IOT 蚂蚁物联
 * 
 * @brief Provide the HAL APIs of LEDs and corresponding opetions.
 * 
 * Processing flow:
 * 
 * call directly.
 * 
 * @version V1.0 2025-04-09
 *
 * @note 1 tab == 4 spaces!
 * 
 *****************************************************************************/

//******************************** Includes *********************************//
#include "bsp_led_driver.h"

//******************************** Includes *********************************//


//******************************** Defines **********************************//
/**
 * @brief instantitate the target of bsp_led_driver_t
 *
 * Steps:
 * 1, Adding the Core interface into target of bsp_led_driver.
 * 2, Adding the OS interface into target of bsp_led_driver.
 * 3, Adding the timebase interface into target of bsp_led_driver interface.
 *
 * @param[in] self      : XXXXXXXXXX.
 * @param[in] led_ops   : XXXXXXXXXX.
 * @param[in] os_delay  : XXXXXXXXXX.
 * @param[in] time_base : XXXXXXXXXX.
 * 
 * @return led_status_t : the status of running.
 */
led_status_t led_driver_inst (
                                bsp_led_driver_t       * const      self,
                                const led_operations_t * const   led_ops,
#ifdef OS_SUPPORT
                                const os_delay_t       * const  os_delay,
#endif // OS_SUPPORT
                                const time_base_ms_t   * const time_base  )
{
    led_status_t ret = LED_OK;
    DEBUG_OUT("led inst start \r\n");

    if (NULL == self      || \
        NULL == led_ops   || \
        NULL == os_delay  || \
        NULL == time_base  
                            ) 
    {
#ifdef DEBUG
        DEBUG_OUT("LED_ERRORPARAMETER\r\n");
#endif
        return LED_ERRORPARAMETER;
    }

    if (INITED == self->is_inited) 
    {
#ifdef DEBUG
        DEBUG_OUT("LED_ERRORRESOURCE\r\n");
#endif  // DEBUG
        return LED_ERRORRESOURCE;
    }

#ifdef DEBUG
    DEBUG_OUT("led_inst_start\r\n");
#endif  // DEBUG   
}

//******************************** Defines **********************************//


//******************************** Declaring ********************************//

//******************************** Declaring ********************************//
